import request from '@/utils/request'

// 查询车辆财务账单列表
export function listFinancial(query) {
  return request({
    url: '/bills/financial/list',
    method: 'get',
    params: query
  })
}
// 查询车辆财务账单统计
export function selectBillFinancialCount(query) {
  return request({
    url: '/bills/financial/selectBillFinancialCount',
    method: 'get',
    params: query
  })
}
export function selectBillFinancialCount1(query) {
  return request({
    url: '/bills/financial/selectBillFinancialCount1',
    method: 'get',
    params: query
  })
}
// 查询订单财务账单列表
export function listOrderFinancial(query) {
  return request({
    url: '/bills/financial/orderList',
    method: 'get',
    params: query
  })
}
// 查询订单财务账单统计
export function selectOrderBillFinancialCount(query) {
  return request({
    url: '/bills/financial/selectOrderBillFinancialCount',
    method: 'get',
    params: query
  })
}
export function selectOrderBillFinancialCount1(query) {
  return request({
    url: '/bills/financial/selectOrderBillFinancialCount1',
    method: 'get',
    params: query
  })
}

//借调列表
export function secondedBillsList(query) {
  return request({
    url: '/bills/financial/secondedBillsList',
    method: 'get',
    params: query
  })
}

// 查询财务账单详细
export function getFinancial(id) {
  return request({
    url: '/bills/financial/' + id,
    method: 'get'
  })
}
//一键清理账单
export function cleanUpBills(data) {
  return request({
    url: '/bills/financial/cleanUpBills' ,
    method: 'post',
    data: data
  })
}
// 未结算借调账单统计
export function secondedBillsCount(data) {
  return request({
    url: '/bills/financial/secondedBillsCount' ,
    method: 'post',
    data: data
  })
}
/*对账单明细详情*/
export function reconciliationDetails(query) {
  return request({
    url: '/bills/financial/reconciliationDetailsList',
    method: 'get',
    params: query
  })
}
//历史对账单
export function selectBilReconciliationList(query) {
  return request({
    url: '/bills/financial/selectBilReconciliationList',
    method: 'get',
    params: query
  })
}
//立即支付
export function payNow(data) {
  return request({
    url: '/bills/financial/payNow',
    method: 'post',
    data: data
  })
}
// 新增财务账单
export function addFinancial(data) {
  return request({
    url: '/bills/financial',
    method: 'post',
    data: data
  })
}

// 修改财务账单
export function updateFinancial(data) {
  return request({
    url: '/bills/financial',
    method: 'put',
    data: data
  })
}
export function receiveMoney(data) {
  return request({
    url: '/bills/financial/receiveMoney',
    method: 'put',
    data: data
  })
}

// 删除财务账单
export function delFinancial(id) {
  return request({
    url: '/bills/financial/' + id,
    method: 'delete'
  })
}

// 导出借调财务账单
export function exportSecondedFinancial(query) {
  return request({
    url: '/bills/financial/secondedExport',
    method: 'get',
    params: query
  })
}
// 导出车辆财务账单
export function exportFinancial(query) {
  return request({
    url: '/bills/financial/export',
    method: 'get',
    params: query
  })
}
//订单财务账单
export function handleOrderExport(query) {
  return request({
    url: '/bills/financial/exportOrder',
    method: 'get',
    params: query
  })
}

// 车辆营收统计
export function vehicleRevenue(query) {
  return request({
    url: '/bills/financial/vehicleRevenue',
    method: 'get',
    params: query
  })
}
// 车辆营收统计
export function vehicleRevenueTotal(query) {
  return request({
    url: '/bills/financial/vehicleRevenueTotal',
    method: 'get',
    params: query
  })
}
// 车辆营收统计导出
export function exportVehicleRevenue(query) {
  return request({
    url: '/bills/financial/exportVehicleRevenue',
    method: 'get',
    params: query
  })
}
// 订单营收统计
export function orderRevenue(query) {
  return request({
    url: '/bills/financial/orderRevenue',
    method: 'get',
    params: query
  })
}
// 订单营收统计数据总览
export function dataScreening(query) {
  return request({
    url: '/bills/financial/dataScreening',
    method: 'get',
    params: query
  })
}
// 订单营收统计导出
export function exportOrderRevenue(query) {
  return request({
    url: '/bills/financial/exportOrderRevenue',
    method: 'get',
    params: query
  })
}

// 订单费用统计
export function orderFee(query) {
  return request({
    url: '/bills/financial/orderFee',
    method: 'get',
    params: query
  })
}
// 车辆费用统计
export function orderFeeTotal(query) {
  return request({
    url: '/bills/financial/orderFeeTotal',
    method: 'get',
    params: query
  })
}
// 订单费用统计导出
export function exportOrderFee(query) {
  return request({
    url: '/bills/financial/exportOrderFee',
    method: 'get',
    params: query
  })
}




// 单车每日概况
export function carEveryday(query) {
  return request({
    url: '/bills/financial/carEveryday',
    method: 'get',
    params: query
  })
}
// 单车每日概况数据总览
export function carEverydayTotal(query) {
  return request({
    url: '/bills/financial/carEverydayTotal',
    method: 'get',
    params: query
  })
}
// 单车每日概况导出
export function exportCarEveryday(query) {
  return request({
    url: '/bills/financial/exportCarEveryday',
    method: 'get',
    params: query
  })
}
// 车型每日概况
export function modelEveryday(query) {
  return request({
    url: '/bills/financial/modelEveryday',
    method: 'get',
    params: query
  })
}
// 车型每日概况数据总览
export function modelEverydayTotal(query) {
  return request({
    url: '/bills/financial/modelEverydayTotal',
    method: 'get',
    params: query
  })
}
// 车型每日概况导出
export function exportModelEveryday(query) {
  return request({
    url: '/bills/financial/exportModelEveryday',
    method: 'get',
    params: query
  })
}

// 单车累计概况
export function carAllDay(query) {
  return request({
    url: '/bills/financial/carAllDay',
    method: 'get',
    params: query
  })
}
// 单车累计概况数据总览
export function carAllDayTotal(query) {
  return request({
    url: '/bills/financial/carAllDayTotal',
    method: 'get',
    params: query
  })
}
// 单车累计概况导出
export function exportCarAllDay(query) {
  return request({
    url: '/bills/financial/exportCarAllDay',
    method: 'get',
    params: query
  })
}
// 车型累计概况
export function modelAllDay(query) {
  return request({
    url: '/bills/financial/modelAllDay',
    method: 'get',
    params: query
  })
}
// 车型累计概况数据总览
export function modelAllDayTotal(query) {
  return request({
    url: '/bills/financial/modelAllDayTotal',
    method: 'get',
    params: query
  })
}
// 车型累计概况导出
export function exportModelAllDay(query) {
  return request({
    url: '/bills/financial/exportModelAllDay',
    method: 'get',
    params: query
  })
}


// 分佣比列列表
export function ratioList(query) {
  return request({
    url: '/shortOrder/ratio/list',
    method: 'get',
    params: query
  })
}

// 分佣比列列表
export function saveRatio(data) {
  return request({
    url: '/shortOrder/ratio',
    method: 'put',
    data: data
  })
}

// ota分佣列表
export function otaOrderReportList(data) {
  return request({
    url: '/order/orderBasic/otaOrderReportList',
    method: 'post',
    data: data
  })
}
